/*
Spotter Exercise Manager
Copyright 2011 Evan Nelson.

This file is part of Spotter Exercise Manager.

Spotter Exercise Manager is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Spotter Exercise Manager is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Spotter Exercise Manager.  If not, see <http://www.gnu.org/licenses/>.

The author can be contacted by emailing ean5533@gmail.com
*/

#ifndef EDITEXERCISES_H
#define EDITEXERCISES_H

#include <QtGui/QDialog>

namespace Ui {
    class EditExercises;
}

class EditExercises : public QDialog {
    Q_OBJECT
    Q_DISABLE_COPY(EditExercises)
public:
    explicit EditExercises(int mode, QWidget *parent = 0);
    virtual ~EditExercises();
    static const int MODE_WT = 1;
    static const int MODE_EN = 2;

    static void insertNewExercise(QString ex, int mode);
    static void deleteExercise(QString ex);

protected:
    virtual void changeEvent(QEvent *e);

private:
    Ui::EditExercises *ui;
    int mode;
    void refreshTable();
    QStringList exercises;

private slots:
    void on_btnDeleteExercise_clicked();
    void on_txtNewEx_returnPressed();
    void on_txtNewEx_textEdited(QString );
    void on_btnAddExercise_clicked();
    void on_btnRenameExercise_clicked();
};

#endif // EDITEXERCISES_H
